package cn.roderick.web.controller;

import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;

@Controller
@RequestMapping("/test")
public class TestController {


    @RequestMapping("/index")
    @ResponseBody
    public String index(Model model){
        model.addAttribute("msg", "Hello, World!");
        return "test";
    }

    @RequestMapping("/modify.html")
    public void modify(@RequestParam("name") String name){
        System.out.println("修改之后： " + name);
    }
}
